home *** CD-ROM | disk | FTP | other *** search
- /*
- -- ANSI C code generated by :
- -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82) --
- -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
- -- Dominique COLNET and Suzanne COLLIN - colnet@loria.fr --
- -- http://www.loria.fr/SmallEiffel --
- */
- #include "compile_to_c.h"
- void r321clear_all(T321* C){
- T0* _value=NULL;
- /*[IRF3.6set_all_with*/{T321* C1=C;
- T0* b1=_value;
- r778set_all_with((((T321*)C1))->_storage/*4*/,b1,(((T321*)C1))->_upper/*12*/);
- }/*]*/
- }
- /*No:FIXED_ARRAY[RUN_FEATURE].set_all_with*/
- void r321make(T321* C,int a1){
- /*IF*/if ((a1)==(0)) {
- C->_upper=-(1);
- }
- else if (((((T321*)C))->_capacity/*8*/)==(0)) {
- C->_storage=calloc(a1,sizeof(T0*));
- C->_capacity=a1;
- C->_upper=(a1)-(1);
- }
- else if (((((T321*)C))->_capacity/*8*/)<(a1)) {
- C->_storage=calloc(a1,sizeof(T0*));
- C->_capacity=a1;
- C->_upper=(a1)-(1);
- }
- else {
- C->_upper=(a1)-(1);
- r321clear_all(C);
- }
- /*FI*/}
- int r321fast_has(T321* C,T0* a1){
- int R=0;
- /*IF*/if ((r321count(C))>(0)) {
- R=(r321fast_index_of(C,a1))<=((((T321*)C))->_upper/*12*/);
- }
- /*FI*/return R;
- }
- T0* r321item(T321* C,int a1){
- T0* R=NULL;
- R=((((T321*)C))->_storage/*4*/)[a1];
- return R;
- }
- void r321resize(T321* C,int a1){
- T0* _elt_default=NULL;
- int _i=0;
- int _new_capacity=0;
- /*IF*/if ((a1)<=(r321count(C))) {
- C->_upper=(a1)-(1);
- }
- else {
- _new_capacity=a1;
- /*IF*/if (((((T321*)C))->_capacity/*8*/)<(_new_capacity)) {
- /*IF*/if (((((T321*)C))->_capacity/*8*/)==(0)) {
- C->_storage=calloc(_new_capacity,sizeof(T0*));
- }
- else {
- C->_storage=r778realloc((((T321*)C))->_storage/*4*/,(((T321*)C))->_capacity/*8*/,_new_capacity);
- }
- /*FI*/C->_capacity=_new_capacity;
- }
- /*FI*/_new_capacity=(((T321*)C))->_upper/*12*/;
- C->_upper=(a1)-(1);
- _i=(((T321*)C))->_upper/*12*/;
- while (!((_i)==(_new_capacity))) {
- /*[IRF3.6put*/{T321* C1=C;
- T0* b1=_elt_default;
- int b2=_i;
- ((((T321*)C1))->_storage/*4*/)[b2]=(b1);
- }/*]*/
- _i=(_i)-(1);
- }
- }
- /*FI*/}
- /*No:FIXED_ARRAY[RUN_FEATURE].storage*/
- /*No:FIXED_ARRAY[RUN_FEATURE].capacity*/
- void r321with_capacity(T321* C,int a1){
- /*IF*/if (((((T321*)C))->_capacity/*8*/)<(a1)) {
- C->_storage=calloc(a1,sizeof(T0*));
- C->_capacity=a1;
- }
- /*FI*/C->_upper=-(1);
- }
- int r321fast_index_of(T321* C,T0* a1){
- int R=0;
- R=r778fast_index_of((((T321*)C))->_storage/*4*/,a1,(((T321*)C))->_upper/*12*/);
- return R;
- }
- /*No:FIXED_ARRAY[RUN_FEATURE].put*/
- /*No:FIXED_ARRAY[RUN_FEATURE].upper*/
- void r321add_last(T321* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if ((((((T321*)C))->_upper/*12*/)+(1))<=(((((T321*)C))->_capacity/*8*/)-(1))) {
- C->_upper=((((T321*)C))->_upper/*12*/)+(1);
- }
- else if (((((T321*)C))->_capacity/*8*/)==(0)) {
- C->_storage=calloc(2,sizeof(T0*));
- C->_capacity=2;
- C->_upper=0;
- }
- else {
- _new_capacity=(2)*((((T321*)C))->_capacity/*8*/);
- C->_storage=r778realloc((((T321*)C))->_storage/*4*/,(((T321*)C))->_capacity/*8*/,_new_capacity);
- C->_capacity=_new_capacity;
- C->_upper=((((T321*)C))->_upper/*12*/)+(1);
- }
- /*FI*//*[IRF3.6put*/{T321* C1=C;
- T0* b1=a1;
- int b2=(((T321*)C))->_upper/*12*/;
- ((((T321*)C1))->_storage/*4*/)[b2]=(b1);
- }/*]*/
- }
- int r321count(T321* C){
- int R=0;
- R=((((T321*)C))->_upper/*12*/)+(1);
- return R;
- }
- /*No:ARRAY[LOCAL_NAME1].clear_all*/
- /*No:ARRAY[LOCAL_NAME1].set_all_with*/
- void r733make(T733* C,int a1,int a2){
- int _needed=0;
- C->_lower=a1;
- C->_upper=a2;
- _needed=((a2)-(a1))+(1);
- /*IF*/if ((_needed)>(0)) {
- /*IF*/if (((((T733*)C))->_capacity/*8*/)<(_needed)) {
- /*IF*/if (((((T733*)C))->_capacity/*8*/)==(0)) {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- else {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- /*FI*/C->_capacity=_needed;
- }
- else {
- /*[IRF3.6clear_all*/{T733* C1=C;
- T0* __value=NULL;
- /*[IRF3.6set_all_with*/{T733* C2=C1;
- T0* c1=__value;
- r731set_all_with((((T733*)C2))->_storage/*4*/,c1,((((T733*)C2))->_upper/*12*/)-((((T733*)C2))->_lower/*16*/));
- }/*]*/
- }/*]*/
- }
- /*FI*/}
- /*FI*/}
- T0* r733item(T733* C,int a1){
- T0* R=NULL;
- R=((((T733*)C))->_storage/*4*/)[(a1)-((((T733*)C))->_lower/*16*/)];
- return R;
- }
- /*No:ARRAY[LOCAL_NAME1].storage*/
- T0* r733twin(T733* C){
- T0* R=NULL;
- R=malloc(sizeof(*C));
- *((T733*)R)=M733;
- r733copy(((T733*)R),((T0*)C));
- return R;
- }
- /*No:ARRAY[LOCAL_NAME1].capacity*/
- void r733copy(T733* C,T0* a1){
- int _needed_capacity=0;
- C->_lower=(((T733*)((T733*)a1)))->_lower/*16*/;
- C->_upper=(((T733*)((T733*)a1)))->_upper/*12*/;
- _needed_capacity=(((((T733*)C))->_upper/*12*/)-((((T733*)C))->_lower/*16*/))+(1);
- /*IF*/if (((((T733*)C))->_capacity/*8*/)<(_needed_capacity)) {
- C->_capacity=_needed_capacity;
- C->_storage=calloc((((T733*)C))->_capacity/*8*/,sizeof(T0*));
- }
- /*FI*//*IF*/if ((_needed_capacity)>(0)) {
- r731copy_from((((T733*)C))->_storage/*4*/,(((T733*)((T733*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
- }
- /*FI*/}
- /*No:ARRAY[LOCAL_NAME1].lower*/
- /*No:ARRAY[LOCAL_NAME1].put*/
- /*No:ARRAY[LOCAL_NAME1].upper*/
- int r733count(T733* C){
- int R=0;
- R=(((((T733*)C))->_upper/*12*/)-((((T733*)C))->_lower/*16*/))+(1);
- return R;
- }
- void r733add_last(T733* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if (((((T733*)C))->_capacity/*8*/)<((r733count(C))+(1))) {
- /*IF*/if (((((T733*)C))->_capacity/*8*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T733*)C))->_capacity/*8*/,sizeof(T0*));
- }
- else {
- _new_capacity=(2)*((((T733*)C))->_capacity/*8*/);
- C->_storage=r731realloc((((T733*)C))->_storage/*4*/,(((T733*)C))->_capacity/*8*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T733*)C))->_upper/*12*/)+(1);
- /*[IRF3.6put*/{T733* C1=C;
- T0* b1=a1;
- int b2=(((T733*)C))->_upper/*12*/;
- ((((T733*)C1))->_storage/*4*/)[(b2)-((((T733*)C1))->_lower/*16*/)]=(b1);
- }/*]*/
- }
- T0* r733first(T733* C){
- T0* R=NULL;
- R=r733item(C,(((T733*)C))->_lower/*16*/);
- return R;
- }
- T0* r247item(T247* C,int a1){
- T0* R=NULL;
- R=((((T247*)C))->_storage/*4*/)[(a1)-((((T247*)C))->_lower/*16*/)];
- return R;
- }
- /*No:ARRAY[WHEN_ITEM_1].storage*/
- T0* r247twin(T247* C){
- T0* R=NULL;
- R=malloc(sizeof(*C));
- *((T247*)R)=M247;
- r247copy(((T247*)R),((T0*)C));
- return R;
- }
- /*No:ARRAY[WHEN_ITEM_1].capacity*/
- void r247copy(T247* C,T0* a1){
- int _needed_capacity=0;
- C->_lower=(((T247*)((T247*)a1)))->_lower/*16*/;
- C->_upper=(((T247*)((T247*)a1)))->_upper/*12*/;
- _needed_capacity=(((((T247*)C))->_upper/*12*/)-((((T247*)C))->_lower/*16*/))+(1);
- /*IF*/if (((((T247*)C))->_capacity/*8*/)<(_needed_capacity)) {
- C->_capacity=_needed_capacity;
- C->_storage=calloc((((T247*)C))->_capacity/*8*/,sizeof(T0*));
- }
- /*FI*//*IF*/if ((_needed_capacity)>(0)) {
- r497copy_from((((T247*)C))->_storage/*4*/,(((T247*)((T247*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
- }
- /*FI*/}
- /*No:ARRAY[WHEN_ITEM_1].lower*/
- /*No:ARRAY[WHEN_ITEM_1].put*/
- /*No:ARRAY[WHEN_ITEM_1].upper*/
- int r247count(T247* C){
- int R=0;
- R=(((((T247*)C))->_upper/*12*/)-((((T247*)C))->_lower/*16*/))+(1);
- return R;
- }
- void r247add_last(T247* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if (((((T247*)C))->_capacity/*8*/)<((r247count(C))+(1))) {
- /*IF*/if (((((T247*)C))->_capacity/*8*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T247*)C))->_capacity/*8*/,sizeof(T0*));
- }
- else {
- _new_capacity=(2)*((((T247*)C))->_capacity/*8*/);
- C->_storage=r497realloc((((T247*)C))->_storage/*4*/,(((T247*)C))->_capacity/*8*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T247*)C))->_upper/*12*/)+(1);
- /*[IRF3.6put*/{T247* C1=C;
- T0* b1=a1;
- int b2=(((T247*)C))->_upper/*12*/;
- ((((T247*)C1))->_storage/*4*/)[(b2)-((((T247*)C1))->_lower/*16*/)]=(b1);
- }/*]*/
- }
- T0* r948item(T948* C,int a1){
- T0* R=NULL;
- R=((((T948*)C))->_storage/*0*/)[(a1)-((((T948*)C))->_lower/*12*/)];
- return R;
- }
- /*No:ARRAY[IFTHEN].storage*/
- T0* r948twin(T948* C){
- T0* R=NULL;
- R=malloc(sizeof(*C));
- *((T948*)R)=M948;
- r948copy(((T948*)R),((T0*)C));
- return R;
- }
- /*No:ARRAY[IFTHEN].capacity*/
- void r948copy(T948* C,T0* a1){
- int _needed_capacity=0;
- C->_lower=(((T948*)((T948*)a1)))->_lower/*12*/;
- C->_upper=(((T948*)((T948*)a1)))->_upper/*8*/;
- _needed_capacity=(((((T948*)C))->_upper/*8*/)-((((T948*)C))->_lower/*12*/))+(1);
- /*IF*/if (((((T948*)C))->_capacity/*4*/)<(_needed_capacity)) {
- C->_capacity=_needed_capacity;
- C->_storage=calloc((((T948*)C))->_capacity/*4*/,sizeof(T0*));
- }
- /*FI*//*IF*/if ((_needed_capacity)>(0)) {
- r191copy_from((((T948*)C))->_storage/*0*/,(((T948*)((T948*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
- }
- /*FI*/}
- /*No:ARRAY[IFTHEN].lower*/
- /*No:ARRAY[IFTHEN].put*/
- /*No:ARRAY[IFTHEN].upper*/
- int r948count(T948* C){
- int R=0;
- R=(((((T948*)C))->_upper/*8*/)-((((T948*)C))->_lower/*12*/))+(1);
- return R;
- }
- void r948add_last(T948* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if (((((T948*)C))->_capacity/*4*/)<((r948count(C))+(1))) {
- /*IF*/if (((((T948*)C))->_capacity/*4*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T948*)C))->_capacity/*4*/,sizeof(T0*));
- }
- else {
- _new_capacity=(2)*((((T948*)C))->_capacity/*4*/);
- C->_storage=r191realloc((((T948*)C))->_storage/*0*/,(((T948*)C))->_capacity/*4*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T948*)C))->_upper/*8*/)+(1);
- /*[IRF3.6put*/{T948* C1=C;
- T0* b1=a1;
- int b2=(((T948*)C))->_upper/*8*/;
- ((((T948*)C1))->_storage/*0*/)[(b2)-((((T948*)C1))->_lower/*12*/)]=(b1);
- }/*]*/
- }
- /*No:ARRAY[RUN_FEATURE_2].clear_all*/
- /*No:ARRAY[RUN_FEATURE_2].set_all_with*/
- void r280force(T280* C,T0* a1,int a2){
- /*IF*/if (((((T280*)C))->_upper/*12*/)<(a2)) {
- r280resize(C,(((T280*)C))->_lower/*16*/,a2);
- }
- else if ((a2)<((((T280*)C))->_lower/*16*/)) {
- r280resize(C,a2,(((T280*)C))->_upper/*12*/);
- }
- /*FI*//*[IRF3.6put*/{T280* C1=C;
- T0* b1=a1;
- int b2=a2;
- ((((T280*)C1))->_storage/*4*/)[(b2)-((((T280*)C1))->_lower/*16*/)]=(b1);
- }/*]*/
- }
- void r280make(T280* C,int a1,int a2){
- int _needed=0;
- C->_lower=a1;
- C->_upper=a2;
- _needed=((a2)-(a1))+(1);
- /*IF*/if ((_needed)>(0)) {
- /*IF*/if (((((T280*)C))->_capacity/*8*/)<(_needed)) {
- /*IF*/if (((((T280*)C))->_capacity/*8*/)==(0)) {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- else {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- /*FI*/C->_capacity=_needed;
- }
- else {
- /*[IRF3.6clear_all*/{T280* C1=C;
- T0* __value=NULL;
- /*[IRF3.6set_all_with*/{T280* C2=C1;
- T0* c1=__value;
- r579set_all_with((((T280*)C2))->_storage/*4*/,c1,((((T280*)C2))->_upper/*12*/)-((((T280*)C2))->_lower/*16*/));
- }/*]*/
- }/*]*/
- }
- /*FI*/}
- /*FI*/}
- T0* r280item(T280* C,int a1){
- T0* R=NULL;
- R=((((T280*)C))->_storage/*4*/)[(a1)-((((T280*)C))->_lower/*16*/)];
- return R;
- }
- void r280resize(T280* C,int a1,int a2){
- int _mem=0;
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T280*n=malloc(sizeof(*n));
- *n=M280;
- r280make(n,a1,a2);
- _other=(T0*)n;
- }
- _i=r2max((((T280*)C))->_lower/*16*/,(((T280*)((T280*)_other)))->_lower/*16*/);
- _up=r2min((((T280*)C))->_upper/*12*/,(((T280*)((T280*)_other)))->_upper/*12*/);
- while (!((_i)>(_up))) {
- /*[IRF3.6put*/{T280* C1=((T280*)_other);
- T0* b1=r280item(C,_i);
- int b2=_i;
- ((((T280*)C1))->_storage/*4*/)[(b2)-((((T280*)C1))->_lower/*16*/)]=(b1);
- }/*]*/
- _i=(_i)+(1);
- }
- *((T280*)(C))=*((T280*)(_other));
- }
- /*No:ARRAY[RUN_FEATURE_2].storage*/
- void r280swap(T280* C,int a1,int a2){
- T0* _tmp=NULL;
- _tmp=r280item(C,a1);
- /*[IRF3.6put*/{T280* C1=C;
- T0* b1=r280item(C,a2);
- int b2=a1;
- ((((T280*)C1))->_storage/*4*/)[(b2)-((((T280*)C1))->_lower/*16*/)]=(b1);
- }/*]*/
- /*[IRF3.6put*/{T280* C1=C;
- T0* b1=_tmp;
- int b2=a2;
- ((((T280*)C1))->_storage/*4*/)[(b2)-((((T280*)C1))->_lower/*16*/)]=(b1);
- }/*]*/
- }
- /*No:ARRAY[RUN_FEATURE_2].capacity*/
- /*No:ARRAY[RUN_FEATURE_2].lower*/
- /*No:ARRAY[RUN_FEATURE_2].put*/
- /*No:ARRAY[RUN_FEATURE_2].upper*/
- int r280count(T280* C){
- int R=0;
- R=(((((T280*)C))->_upper/*12*/)-((((T280*)C))->_lower/*16*/))+(1);
- return R;
- }
- void r280add_last(T280* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if (((((T280*)C))->_capacity/*8*/)<((r280count(C))+(1))) {
- /*IF*/if (((((T280*)C))->_capacity/*8*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T280*)C))->_capacity/*8*/,sizeof(T0*));
- }
- else {
- _new_capacity=(2)*((((T280*)C))->_capacity/*8*/);
- C->_storage=r579realloc((((T280*)C))->_storage/*4*/,(((T280*)C))->_capacity/*8*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T280*)C))->_upper/*12*/)+(1);
- /*[IRF3.6put*/{T280* C1=C;
- T0* b1=a1;
- int b2=(((T280*)C))->_upper/*12*/;
- ((((T280*)C1))->_storage/*4*/)[(b2)-((((T280*)C1))->_lower/*16*/)]=(b1);
- }/*]*/
- }
- /*No:ARRAY[ARGUMENT_NAME1].clear_all*/
- /*No:ARRAY[ARGUMENT_NAME1].set_all_with*/
- void r65make(T65* C,int a1,int a2){
- int _needed=0;
- C->_lower=a1;
- C->_upper=a2;
- _needed=((a2)-(a1))+(1);
- /*IF*/if ((_needed)>(0)) {
- /*IF*/if (((((T65*)C))->_capacity/*8*/)<(_needed)) {
- /*IF*/if (((((T65*)C))->_capacity/*8*/)==(0)) {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- else {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- /*FI*/C->_capacity=_needed;
- }
- else {
- /*[IRF3.6clear_all*/{T65* C1=C;
- T0* __value=NULL;
- /*[IRF3.6set_all_with*/{T65* C2=C1;
- T0* c1=__value;
- r24set_all_with((((T65*)C2))->_storage/*4*/,c1,((((T65*)C2))->_upper/*12*/)-((((T65*)C2))->_lower/*16*/));
- }/*]*/
- }/*]*/
- }
- /*FI*/}
- /*FI*/}
- T0* r65item(T65* C,int a1){
- T0* R=NULL;
- R=((((T65*)C))->_storage/*4*/)[(a1)-((((T65*)C))->_lower/*16*/)];
- return R;
- }
- /*No:ARRAY[ARGUMENT_NAME1].storage*/
- T0* r65twin(T65* C){
- T0* R=NULL;
- R=malloc(sizeof(*C));
- *((T65*)R)=M65;
- r65copy(((T65*)R),((T0*)C));
- return R;
- }
- /*No:ARRAY[ARGUMENT_NAME1].capacity*/
- void r65copy(T65* C,T0* a1){
- int _needed_capacity=0;
- C->_lower=(((T65*)((T65*)a1)))->_lower/*16*/;
- C->_upper=(((T65*)((T65*)a1)))->_upper/*12*/;
- _needed_capacity=(((((T65*)C))->_upper/*12*/)-((((T65*)C))->_lower/*16*/))+(1);
- /*IF*/if (((((T65*)C))->_capacity/*8*/)<(_needed_capacity)) {
- C->_capacity=_needed_capacity;
- C->_storage=calloc((((T65*)C))->_capacity/*8*/,sizeof(T0*));
- }
- /*FI*//*IF*/if ((_needed_capacity)>(0)) {
- r24copy_from((((T65*)C))->_storage/*4*/,(((T65*)((T65*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
- }
- /*FI*/}
- /*No:ARRAY[ARGUMENT_NAME1].lower*/
- /*No:ARRAY[ARGUMENT_NAME1].put*/
- /*No:ARRAY[ARGUMENT_NAME1].upper*/
- int r65count(T65* C){
- int R=0;
- R=(((((T65*)C))->_upper/*12*/)-((((T65*)C))->_lower/*16*/))+(1);
- return R;
- }
- void r65add_last(T65* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if (((((T65*)C))->_capacity/*8*/)<((r65count(C))+(1))) {
- /*IF*/if (((((T65*)C))->_capacity/*8*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T65*)C))->_capacity/*8*/,sizeof(T0*));
- }
- else {
- _new_capacity=(2)*((((T65*)C))->_capacity/*8*/);
- C->_storage=r24realloc((((T65*)C))->_storage/*4*/,(((T65*)C))->_capacity/*8*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T65*)C))->_upper/*12*/)+(1);
- /*[IRF3.6put*/{T65* C1=C;
- T0* b1=a1;
- int b2=(((T65*)C))->_upper/*12*/;
- ((((T65*)C1))->_storage/*4*/)[(b2)-((((T65*)C1))->_lower/*16*/)]=(b1);
- }/*]*/
- }
- T0* r65first(T65* C){
- T0* R=NULL;
- R=r65item(C,(((T65*)C))->_lower/*16*/);
- return R;
- }
- /*No:ARRAY[E_FEATURE].clear_all*/
- /*No:ARRAY[E_FEATURE].set_all_with*/
- void r495make(T495* C,int a1,int a2){
- int _needed=0;
- C->_lower=a1;
- C->_upper=a2;
- _needed=((a2)-(a1))+(1);
- /*IF*/if ((_needed)>(0)) {
- /*IF*/if (((((T495*)C))->_capacity/*4*/)<(_needed)) {
- /*IF*/if (((((T495*)C))->_capacity/*4*/)==(0)) {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- else {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- /*FI*/C->_capacity=_needed;
- }
- else {
- /*[IRF3.6clear_all*/{T495* C1=C;
- T0* __value=NULL;
- /*[IRF3.6set_all_with*/{T495* C2=C1;
- T0* c1=__value;
- r822set_all_with((((T495*)C2))->_storage/*0*/,c1,((((T495*)C2))->_upper/*8*/)-((((T495*)C2))->_lower/*12*/));
- }/*]*/
- }/*]*/
- }
- /*FI*/}
- /*FI*/}
- int r495fast_has(T495* C,T0* a1){
- int R=0;
- /*IF*/if ((r495count(C))>(0)) {
- R=(r495fast_index_of(C,a1))<=((((T495*)C))->_upper/*8*/);
- }
- /*FI*/return R;
- }
- T0* r495item(T495* C,int a1){
- T0* R=NULL;
- R=((((T495*)C))->_storage/*0*/)[(a1)-((((T495*)C))->_lower/*12*/)];
- return R;
- }
- void r495resize(T495* C,int a1,int a2){
- int _mem=0;
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T495*n=malloc(sizeof(*n));
- *n=M495;
- r495make(n,a1,a2);
- _other=(T0*)n;
- }
- _i=r2max((((T495*)C))->_lower/*12*/,(((T495*)((T495*)_other)))->_lower/*12*/);
- _up=r2min((((T495*)C))->_upper/*8*/,(((T495*)((T495*)_other)))->_upper/*8*/);
- while (!((_i)>(_up))) {
- /*[IRF3.6put*/{T495* C1=((T495*)_other);
- T0* b1=r495item(C,_i);
- int b2=_i;
- ((((T495*)C1))->_storage/*0*/)[(b2)-((((T495*)C1))->_lower/*12*/)]=(b1);
- }/*]*/
- _i=(_i)+(1);
- }
- *((T495*)(C))=*((T495*)(_other));
- }
- /*No:ARRAY[E_FEATURE].storage*/
- /*No:ARRAY[E_FEATURE].capacity*/
- /*No:ARRAY[E_FEATURE].lower*/
- void r495with_capacity(T495* C,int a1,int a2){
- /*IF*/if (((((T495*)C))->_capacity/*4*/)<(a1)) {
- C->_storage=calloc(a1,sizeof(T0*));
- C->_capacity=a1;
- }
- /*FI*/C->_lower=a2;
- C->_upper=(a2)-(1);
- }
- int r495fast_index_of(T495* C,T0* a1){
- int R=0;
- R=((((T495*)C))->_lower/*12*/)+(r822fast_index_of((((T495*)C))->_storage/*0*/,a1,((((T495*)C))->_upper/*8*/)-((((T495*)C))->_lower/*12*/)));
- return R;
- }
- /*No:ARRAY[E_FEATURE].put*/
- /*No:ARRAY[E_FEATURE].upper*/
- void r495add_last(T495* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if (((((T495*)C))->_capacity/*4*/)<((r495count(C))+(1))) {
- /*IF*/if (((((T495*)C))->_capacity/*4*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T495*)C))->_capacity/*4*/,sizeof(T0*));
- }
- else {
- _new_capacity=(2)*((((T495*)C))->_capacity/*4*/);
- C->_storage=r822realloc((((T495*)C))->_storage/*0*/,(((T495*)C))->_capacity/*4*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T495*)C))->_upper/*8*/)+(1);
- /*[IRF3.6put*/{T495* C1=C;
- T0* b1=a1;
- int b2=(((T495*)C))->_upper/*8*/;
- ((((T495*)C1))->_storage/*0*/)[(b2)-((((T495*)C1))->_lower/*12*/)]=(b1);
- }/*]*/
- }
- int r495count(T495* C){
- int R=0;
- R=(((((T495*)C))->_upper/*8*/)-((((T495*)C))->_lower/*12*/))+(1);
- return R;
- }
- T0* r263item(T263* C,int a1){
- T0* R=NULL;
- R=((((T263*)C))->_storage/*4*/)[(a1)-((((T263*)C))->_lower/*16*/)];
- return R;
- }
- /*No:ARRAY[WHEN_ITEM_2].storage*/
- T0* r263twin(T263* C){
- T0* R=NULL;
- R=malloc(sizeof(*C));
- *((T263*)R)=M263;
- r263copy(((T263*)R),((T0*)C));
- return R;
- }
- /*No:ARRAY[WHEN_ITEM_2].capacity*/
- void r263copy(T263* C,T0* a1){
- int _needed_capacity=0;
- C->_lower=(((T263*)((T263*)a1)))->_lower/*16*/;
- C->_upper=(((T263*)((T263*)a1)))->_upper/*12*/;
- _needed_capacity=(((((T263*)C))->_upper/*12*/)-((((T263*)C))->_lower/*16*/))+(1);
- /*IF*/if (((((T263*)C))->_capacity/*8*/)<(_needed_capacity)) {
- C->_capacity=_needed_capacity;
- C->_storage=calloc((((T263*)C))->_capacity/*8*/,sizeof(T0*));
- }
- /*FI*//*IF*/if ((_needed_capacity)>(0)) {
- r533copy_from((((T263*)C))->_storage/*4*/,(((T263*)((T263*)a1)))->_storage/*4*/,(_needed_capacity)-(1));
- }
- /*FI*/}
- /*No:ARRAY[WHEN_ITEM_2].lower*/
- /*No:ARRAY[WHEN_ITEM_2].put*/
- /*No:ARRAY[WHEN_ITEM_2].upper*/
- int r263count(T263* C){
- int R=0;
- R=(((((T263*)C))->_upper/*12*/)-((((T263*)C))->_lower/*16*/))+(1);
- return R;
- }
- void r263add_last(T263* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if (((((T263*)C))->_capacity/*8*/)<((r263count(C))+(1))) {
- /*IF*/if (((((T263*)C))->_capacity/*8*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T263*)C))->_capacity/*8*/,sizeof(T0*));
- }
- else {
- _new_capacity=(2)*((((T263*)C))->_capacity/*8*/);
- C->_storage=r533realloc((((T263*)C))->_storage/*4*/,(((T263*)C))->_capacity/*8*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T263*)C))->_upper/*12*/)+(1);
- /*[IRF3.6put*/{T263* C1=C;
- T0* b1=a1;
- int b2=(((T263*)C))->_upper/*12*/;
- ((((T263*)C1))->_storage/*4*/)[(b2)-((((T263*)C1))->_lower/*16*/)]=(b1);
- }/*]*/
- }
- T0* r272item(T272* C,int a1){
- T0* R=NULL;
- R=((((T272*)C))->_storage/*4*/)[a1];
- return R;
- }
- /*No:FIXED_ARRAY[TYPE].storage*/
- /*No:FIXED_ARRAY[TYPE].capacity*/
- void r272with_capacity(T272* C,int a1){
- /*IF*/if (((((T272*)C))->_capacity/*8*/)<(a1)) {
- C->_storage=calloc(a1,sizeof(T0*));
- C->_capacity=a1;
- }
- /*FI*/C->_upper=-(1);
- }
- /*No:FIXED_ARRAY[TYPE].put*/
- /*No:FIXED_ARRAY[TYPE].upper*/
- void r272add_last(T272* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if ((((((T272*)C))->_upper/*12*/)+(1))<=(((((T272*)C))->_capacity/*8*/)-(1))) {
- C->_upper=((((T272*)C))->_upper/*12*/)+(1);
- }
- else if (((((T272*)C))->_capacity/*8*/)==(0)) {
- C->_storage=calloc(2,sizeof(T0*));
- C->_capacity=2;
- C->_upper=0;
- }
- else {
- _new_capacity=(2)*((((T272*)C))->_capacity/*8*/);
- C->_storage=r770realloc((((T272*)C))->_storage/*4*/,(((T272*)C))->_capacity/*8*/,_new_capacity);
- C->_capacity=_new_capacity;
- C->_upper=((((T272*)C))->_upper/*12*/)+(1);
- }
- /*FI*//*[IRF3.6put*/{T272* C1=C;
- T0* b1=a1;
- int b2=(((T272*)C))->_upper/*12*/;
- ((((T272*)C1))->_storage/*4*/)[b2]=(b1);
- }/*]*/
- }
- /*No:ARRAY[TYPE].clear_all*/
- /*No:ARRAY[TYPE].set_all_with*/
- void r701make(T701* C,int a1,int a2){
- int _needed=0;
- C->_lower=a1;
- C->_upper=a2;
- _needed=((a2)-(a1))+(1);
- /*IF*/if ((_needed)>(0)) {
- /*IF*/if (((((T701*)C))->_capacity/*4*/)<(_needed)) {
- /*IF*/if (((((T701*)C))->_capacity/*4*/)==(0)) {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- else {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- /*FI*/C->_capacity=_needed;
- }
- else {
- /*[IRF3.6clear_all*/{T701* C1=C;
- T0* __value=NULL;
- /*[IRF3.6set_all_with*/{T701* C2=C1;
- T0* c1=__value;
- r770set_all_with((((T701*)C2))->_storage/*0*/,c1,((((T701*)C2))->_upper/*8*/)-((((T701*)C2))->_lower/*12*/));
- }/*]*/
- }/*]*/
- }
- /*FI*/}
- /*FI*/}
- T0* r701item(T701* C,int a1){
- T0* R=NULL;
- R=((((T701*)C))->_storage/*0*/)[(a1)-((((T701*)C))->_lower/*12*/)];
- return R;
- }
- void r701resize(T701* C,int a1,int a2){
- int _mem=0;
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T701*n=malloc(sizeof(*n));
- *n=M701;
- r701make(n,a1,a2);
- _other=(T0*)n;
- }
- _i=r2max((((T701*)C))->_lower/*12*/,(((T701*)((T701*)_other)))->_lower/*12*/);
- _up=r2min((((T701*)C))->_upper/*8*/,(((T701*)((T701*)_other)))->_upper/*8*/);
- while (!((_i)>(_up))) {
- /*[IRF3.6put*/{T701* C1=((T701*)_other);
- T0* b1=r701item(C,_i);
- int b2=_i;
- ((((T701*)C1))->_storage/*0*/)[(b2)-((((T701*)C1))->_lower/*12*/)]=(b1);
- }/*]*/
- _i=(_i)+(1);
- }
- *((T701*)(C))=*((T701*)(_other));
- }
- /*No:ARRAY[TYPE].storage*/
- T0* r701twin(T701* C){
- T0* R=NULL;
- R=malloc(sizeof(*C));
- *((T701*)R)=M701;
- r701copy(((T701*)R),((T0*)C));
- return R;
- }
- /*No:ARRAY[TYPE].capacity*/
- void r701copy(T701* C,T0* a1){
- int _needed_capacity=0;
- C->_lower=(((T701*)((T701*)a1)))->_lower/*12*/;
- C->_upper=(((T701*)((T701*)a1)))->_upper/*8*/;
- _needed_capacity=(((((T701*)C))->_upper/*8*/)-((((T701*)C))->_lower/*12*/))+(1);
- /*IF*/if (((((T701*)C))->_capacity/*4*/)<(_needed_capacity)) {
- C->_capacity=_needed_capacity;
- C->_storage=calloc((((T701*)C))->_capacity/*4*/,sizeof(T0*));
- }
- /*FI*//*IF*/if ((_needed_capacity)>(0)) {
- r770copy_from((((T701*)C))->_storage/*0*/,(((T701*)((T701*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
- }
- /*FI*/}
- /*No:ARRAY[TYPE].lower*/
- /*No:ARRAY[TYPE].put*/
- /*No:ARRAY[TYPE].upper*/
- int r701count(T701* C){
- int R=0;
- R=(((((T701*)C))->_upper/*8*/)-((((T701*)C))->_lower/*12*/))+(1);
- return R;
- }
- void r701add_last(T701* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if (((((T701*)C))->_capacity/*4*/)<((r701count(C))+(1))) {
- /*IF*/if (((((T701*)C))->_capacity/*4*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T701*)C))->_capacity/*4*/,sizeof(T0*));
- }
- else {
- _new_capacity=(2)*((((T701*)C))->_capacity/*4*/);
- C->_storage=r770realloc((((T701*)C))->_storage/*0*/,(((T701*)C))->_capacity/*4*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T701*)C))->_upper/*8*/)+(1);
- /*[IRF3.6put*/{T701* C1=C;
- T0* b1=a1;
- int b2=(((T701*)C))->_upper/*8*/;
- ((((T701*)C1))->_storage/*0*/)[(b2)-((((T701*)C1))->_lower/*12*/)]=(b1);
- }/*]*/
- }
-
-